package com.weetop.cfw.message.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.weetop.cfw.R
import com.weetop.cfw.bean.MessageListBean
import com.weetop.cfw.bean.TestBean

class SystemMessageAdapter(layoutId:Int,dataList:List<MessageListBean.DataBean>):BaseQuickAdapter<MessageListBean.DataBean,BaseViewHolder>(layoutId,dataList) {

    override fun convert(helper: BaseViewHolder, item: MessageListBean.DataBean?) {
        when (item?.mtype) {
            1 -> helper.setImageResource(R.id.textMessageLogo,R.mipmap.member_message_logo)
            2 -> helper.setImageResource(R.id.textMessageLogo,R.mipmap.huo_dong_message_logo)
            3 -> helper.setImageResource(R.id.textMessageLogo,R.mipmap.system_message_logo)
            4 -> helper.setImageResource(R.id.textMessageLogo,R.mipmap.member_charge_message_logo)
            else -> helper.setImageResource(R.id.textMessageLogo,R.mipmap.course_message_logo)
        }
       helper.setText(R.id.textMessageTitle,item?.title).setText(R.id.textMessageTime,item?.msgdate).setText(R.id.textMessageContent,item?.remark)
    }

}